package com.ustc.hewei.nettyrpc2_0.common.utils;

import com.ustc.hewei.nettyrpc2_0.common.config.PropertyFactory;

import java.util.Properties;

/**
 * @author hewei
 * @version 1.0
 * @description: TODO
 * @date 2022/11/24 20:56
 */

public class PropertiesUtil {

    public static Properties properties;

    static {
        properties = PropertyFactory.getProperties();
        System.out.println("chushihua");
    }

    public static long getLong(String key) {
        return Long.parseLong(properties.getProperty(key));
    }

    public static int getInt(String key) {
        return Integer.parseInt(properties.getProperty(key));
    }

    public static String getString(String key) {
        return properties.getProperty(key);
    }
}
